The present invention relates generally to motion control systems and methods in which a series of programmed points are provided, and smooth movement is accomplished between these points using spline interpolation, such as a third or higher order polynomial function for example. In particular, the present invention relates to a motion control system and method which automatically determines when a smooth curve in a series of points was intended, and only interpolates with splines when such a curve is intended. Moreover, the invention relates to a motion control system and method for smoothly moving through a series of programmed points by using only the programmed information and without requiring additional data from the user, so that the system and method can be used with existing part programs.
Computer controlled positioning systems, such as machine tool systems or robotic mechanisms for example, typically include one or more movable members, such as a spindle carrier for example, which are movable along one or more motion axes. In response to a set of programmed control points which define a desired motion path, a computer or other controller generates position commands causing the axes that drive the movable members to be moved in a coordinated fashion along an actual motion path, which is intended to replicate the desired path. In such systems, the points along the path are typically inserted in a program along with a command defining how the points are to be traversed. For example, with respect to the machine tool context, a xe2x80x9cpart programxe2x80x9d can be constructed utilizing datapoints along the path in three dimensional space, and xe2x80x9cG-codesxe2x80x9d which determine how the points are to be traversed (e.g., linearly or circular or helical). The command and the points that follow it are referred to as a xe2x80x9cblockxe2x80x9d in the program. Linear paths are typically programmed by defining the end points along the line, and circular paths are typically programmed by defining the circle segment endpoints and circle center. Motion along the path can be achieved by interpolating intermediate position commands along the path between the programmed points at a predetermined repetition rate, and motion of the movable members can be controlled in response to these intermediate xe2x80x9cinterpolatedxe2x80x9d position commands.
Previously, to approximate non-circular curved paths, a large number of points along the path were programmed, and the path was interpolated linearly, so as to create a series of short line segments. However, reproduction of a desired smooth contour with a series of short line segments can result in a program which consumes large amounts of memory, and the velocity in which the curved span is traversed can be limited by the controller""s processing capability. Moreover, such programming results in instantaneous changes in direction at the transitions between the short segments, causing step changes in axis velocity, which, in machine tool applications, can result in reduced quality of surface finish, accuracy errors on the finished workpiece, undesirable machine vibrations, and/or jerky motion. Accordingly, a method and apparatus for smoothly moving through paths having contoured portions with accuracy and without vibrations is desired. Additionally, a curve composed of many small linear segments does not contain any information to the control about the average curvature and the control is unable to precisely limit the feedrate of the curve as is normally required to prevent axis accelerations from being exceeded.
Methods have been developed which allow a programmer or computer aided manufacturing system (CAM) to supply parametric information to describe the desired curve or contour as a function of time. While such methods allow the desired curve to be traversed without approximation calculations by the controller, such approaches require additional information to be supplied by the programmer or the CAM, other than simply the programmed endpoints.
In addition, spline interpolation methods have been developed for connecting programmed points with one or more smooth curves, or splines. However, such methods can not accurately predict the path that was desired by the user solely from the endpoints that are programmed. For example, such methods provide no capability of automatically distinguishing between a series of points that were intended to define a sharp corner and a series of points that were intended to define a smooth contour through the points. Thus, the path actually achieved may differ significantly from the desired path.
Moreover, many such spline interpolation methods require additional points from the user in order to define a path that is to be interpolated using splines. Thus, an existing part program, such as those that define contoured sections by a plurality of short spans, cannot be utilized with such a method without additional parameters being provided.
Accordingly, it is desirable to provide a spline interpolation motion control system and method which can accurately and automatically distinguish between contoured paths, linear paths, and sharp corners in a part program, and to use spline interpolation only for the contoured paths. It is also desirable to make such decisions solely from programmed endpoints and without additional parameters from the user. In addition, it is desirable to provide such a system and method which can smoothly connect the various flat, contoured, and cornered segments with minimal step changes in velocity. Moreover, it is desirable to provide a spline interpolation system and method which can be used with conventional part programs, which were written for non-spline control systems, with minimal changes to the part program. In addition, it is desirable to provide a spline interpolation motion control system and method which provides the ability to apply consistent velocity constraints to the controlled motion based upon path curvature, to thereby more accurately control the motion. Furthermore, it is desirable to provide such a system and method which allows for precise control of path speed and acceleration.
It is an object of the present invention to obviate the above-described problems.
It is another object of the present invention to provide a system and method for controlling a machine tool that can provide machined parts of high quality and minimal wear on the machine.
An additional object of the present invention is to provide a motion control system and method that can accurately and automatically determine an intended path from points along the path. To achieve one or more of these objects, a method of controlling motion of a set of axes to provide desired motion of movable machine member or members is provided. The method comprises receiving a plurality of points that define a desired path for the movable member, the plurality of points defining a plurality of spans on the desired path. The method also comprises calculating a length of each span in the plurality of spans, and at each span, determining the relative length of a first span with respect to at least one other adjacent span in the plurality of spans. Based upon the relative length, it is decided whether the span should be interpolated using a spline function and whether the adjacent span should be interpolated using a spline function. If the first span should be interpolated using a spline function, the method derives a spline interpolation equation for the first span, wherein the spline interpolation equation comprises a polynomial of at least the third order. A movable member is then moved according to the spline interpolation function.
According to another aspect of the invention, a method of controlling motion of a movable machine member. The method comprises receiving a plurality of points that define a desired path for the movable member, the plurality of points defining a plurality of spans on the desired path. The method also comprises determining a change in direction between each pair of adjacent spans. A first span and a second span in the plurality of spans comprise an adjacent pair, and the change in direction is compared to an angle threshold. (The first and second spans are consecutive spans.) Based upon the comparison, it is decided whether the first span should be interpolated using a spline function and whether the second span should be interpolated using a spline function. If the first span should be interpolated using a spline function, a spline interpolation equation is derived for the first span, wherein the spline interpolation equation comprises a polynomial of at least the third order. The movable member is then moved according to the spline interpolation equation.
A method of controlling motion of a movable machine member is also provided according to one aspect of the invention. The method comprises providing a program having a plurality of points that define a plurality of spans on a desired path for the movable member. The program contains no spline interpolation commands, and the program commands a curved section by a series of short spans. The method also comprises indicating that the curved section of the program should be interpolated using splines, without providing any additional points on the desired path. In addition, it is determined where the curved section is located in the program. Using the points in the program, a spline interpolation equation is calculated for the curved section, and the movable member is moved according to the spline interpolation equation.
According to another aspect, a method of controlling motion of a movable machine member is provided. The method comprises receiving a plurality of points that define a desired path for the movable member, the plurality of points defining a plurality of spans on the desired path. Then, it is decided whether a current span in the program should be interpolated using a spline interpolation function. If the current span is to be interpolated using a spline interpolation function, a spline type is selected for the current span from a plurality of spline types based upon characteristics of spans adjacent to the current span. Based upon the spline type, constraints are determined for the spline interpolation function. The constraints determine the transition between the previous span and the current span and the transition between the current span and the next span. Using the constraints, a spline interpolation equation is determined for the current span. The movable member is moved according to the spline interpolation equation.
A system for controlling the motion of a movable member is also provided. The system comprises a movable member, a number of actuators coupled to the movable member to cause non-linear movement of the member, and a memory unit containing a plurality of points which define a desired path for the movable member, the plurality of points defining a plurality of spans on the desired path. The system also includes a spline function calculator in communication with the memory unit. The spline function calculator is configured to choose which of the plurality of spans should be interpolated using a spline function based upon the length of the spans and to calculate a spline interpolation function for the chosen spans. A position command interpolator is also provided which is in communication with the spline function calculator and configured to interpolate position commands from the spline interpolation function for control of the actuator.
Still other objects of the present invention will become apparent to those skilled in this art from the following description wherein there is shown and described exemplary embodiments of this invention, including a best mode currently contemplated for carrying out the invention, simply for the purposes of illustration. As will be realized, the invention is capable of other different aspects and embodiments without departing from the scope of the invention. Accordingly, the drawings and descriptions are illustrative in nature and not restrictive in nature.